/**
 * Copyright (C), 2019-2022, 宇信融汇
 * FileName: Mar01
 * Author:   666
 * Date:     2022/4/5 23:02
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 666           修改时间           版本号              描述
 */
package com.singleton;

/**
 * @Classname Mar01
 * @Description 饿汉式
 * @Date 2022/4/5 23:02
 * @Created by 666
 */
public class Mar01 {

    /**
     * 常量对象
     */
    private static  Mar01 INSTANCE = new Mar01();

    private Mar01() {
    }

    public static Mar01 getInstance() {
        return INSTANCE;
    }

    public static void main(String[] args) {
        Mar01 m1 = getInstance();
        Mar01 m2 = getInstance();
        System.out.println(m1==m2);
    }
}
